﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ModelLayer
{
    public struct Coordinates
    {
        public float Longitude, Latitude;
        public Coordinates(float Longitude, float Latitude)
        {
            this.Latitude = Latitude;
            this.Longitude = Longitude;
        }
    }

    public enum Type
    {
        TrafficJam,
        ConstructionWork,
        Accident
    }

    public class Node
    {
        string title;
        int id;
        DateTime date;
        Type type;
        Coordinates coordinates;

        public Node()
        {
            id = -1;
            title = "";
            date = new DateTime();
            type = ModelLayer.Type.TrafficJam;
            coordinates = new Coordinates(0, 0);
        }

        public Node(string title, int id, DateTime date, Type type, 
            Coordinates coordinates)
        {
            this.id = id;
            this.title = title;
            this.date = date;
            this.type = type;
            this.coordinates = coordinates;
        }

        public String Title
        {
            get
            {
                return title;
            }
            set
            {
                this.title = value;
            }
        }
        
        public int Id
        {
            get
            {
                return id;
            }
            set
            {
                this.id = value;
            }
        }

        public DateTime Date
        {
            get
            {
                return date;
            }
            set
            {
                this.date = value;
            }
        }

        public Type Type
        {
            get
            {
                return type;
            }
            set
            {
                type = value;
            }
        }

        public Coordinates Coordinates
        {
            get
            {
                return coordinates;
            }
            set
            {
                coordinates = value;
            }
        }
    }
}
